//**********************************************************************
// Package
//**********************************************************************

package vista.extra.org.freixas.jcalendar;// en este caso le puse videoclub.xxxxxx, en general para
//reutilizar este componente se debe agregar el nombre de el paquete antes del org.xxxxx

//**********************************************************************
// Import list
//**********************************************************************

import java.util.EventObject;
import java.util.Calendar;

/**
 * Esta clase contiene informacion relativa a fechas manipulables en un calendario.
 *
 * @see JCalendar
 * @see JCalendarCombo
 * @author Antonio Freixas
 * Blackowl, especialmente su depto. grafico, le agradece eternamente a Antonio Freixas
 * Grande Antonio !!!!!!!!!!
 */

// Copyright � 2003 Antonio Freixas
// All Rights Reserved.

public class DateEvent extends EventObject
{
//**********************************************************************
// Private Members
//**********************************************************************

private Calendar selectedDate;

//**********************************************************************
// Constructors
//**********************************************************************

/**
 * Create a date event.
 *
 * @param source The object on which the event occurred.
 * @param selectedDate The selected date.
 */

public DateEvent(Object source, Calendar selectedDate)
{
    super(source);
    this.selectedDate = selectedDate;
}

//**********************************************************************
// Public
//**********************************************************************

/**
 * Return the selected date.
 *
 * @return The selected date.
 */

public Calendar getSelectedDate()
{
    return selectedDate;
}

//The default equals and hashCode methods are acceptable.

/**
 * {@inheritDoc}
 * Este metodo sobrescribe el metodo toString de la clase java.util.EventObject
 */
public String toString()
{
    return
	super.toString() + ",selectedDate=" +
	selectedDate.getTime().toString();
}

}
